#pragma once

#include "CoreMinimal.h"
#include "InputAction.h"
#include "InputMappingContext.h"
#include "EnhancedInputComponent.h"
#include "EnhancedInputSubsystems.h"
#include "GameFramework/PlayerController.h"
#include "DemoController.generated.h"

UCLASS()
class ADemoController : public APlayerController
{
	GENERATED_BODY()

public:
	ADemoController();

	virtual void BeginPlay() override;

	virtual void Tick(float DeltaSeconds) override;

	virtual void SetupInputComponent() override;

protected:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "输入设置", DisplayName = "移动操作映射")
	TObjectPtr<UInputAction> MoveAction;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "输入设置", DisplayName = "视角操作映射")
	TObjectPtr<UInputAction> LookAction;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "输入设置", DisplayName = "开火操作映射")
	TObjectPtr<UInputAction> FireAction;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "输入设置", DisplayName = "输入上下文")
	TObjectPtr<UInputMappingContext> InputMappingContext;

	void Move(const FInputActionValue& Value);

	void Look(const FInputActionValue& Value);

	void Fire();
};
